/**
	The Minerva Project, DAG Scheduling Tools
	Copyright (C) 2006 Florin Pop & Stefan Bucur

	This program is free software; you can redistribute it and/or modify
	it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
 */
package ro.pub.cs.minerva.task;

import ro.pub.cs.minerva.graph.*;

/**
 * @author Stefan Bucur
 *
 */
public class Dependency extends GraphLink<Task> {
	private int delayTime;
	
	public Dependency(Task task, Task depTask) {
		super(task, depTask);
		
		delayTime = 0;
	}
	
	public int getDelayTime() {
		return delayTime;
	}
	
	public void setDelayTime(int time) {
		this.delayTime = time;
	}

	@Override
	public boolean equals(Object obj) {
		if (!super.equals(obj))
			return false;
		
		if (!(obj instanceof Dependency))
			return false;
		
		Dependency dep = (Dependency)obj;
		
		if (this.delayTime != dep.delayTime)
			return false;
		else
			return true;
	}
}
